package io.renren.modules.gengyun.service.impl;


import io.renren.modules.gengyun.dao.PlanGrowthPeriodDao;
import io.renren.modules.gengyun.entity.PlanGrowthPeriodEntity;
import io.renren.modules.gengyun.service.PlanGrowthPeriodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Service
public class PlanGrowthPeriodServiceImpl implements PlanGrowthPeriodService {
    @Autowired
    private PlanGrowthPeriodDao growth_periodDao;


    @Override
    public PlanGrowthPeriodEntity getPeriod(Long id) {
        return growth_periodDao.getPeriod(id);
    }

    @Override
    public int save(PlanGrowthPeriodEntity growth_period) {
        return growth_periodDao.save(growth_period);
    }

    @Override
    public int update(PlanGrowthPeriodEntity growth_period) {
        return growth_periodDao.update(growth_period);
    }

    @Override
    public int delete(Long id) {
        return growth_periodDao.deleteById(id);
    }

    @Override
    public List<Map<String, Object>> allList() {
        return growth_periodDao.allList();
    }

    @Override
    public List<Map<String, Object>> findByDateList(Date date) {
        return growth_periodDao.findByDateList(date);
    }
}
